package com.example.demo.util;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * 分页Model类
 * 
 * @author
 *
 */
public class PageBean {

	private int page = 1; // 第几页
	private int pageSize = 10; // 每页记录数
	private Long total; // 总记录数
	@JsonIgnore
	private int start; // 起始页
	private Object data; // 数据返回
	public void setStart(int start) {
		this.start = start;
	}
	public int getStart() {
		return (page - 1) * pageSize;
	}
	public Long getTotal() {
		return total;
	}

	public void setTotal(Long total) {
		this.total = total;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public PageBean() {
	}

	public PageBean(int page, int pageSize) {
		super();
		this.page = page;
		this.pageSize = pageSize;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	

	@Override
	public String toString() {
		return "PageBean [page=" + page + ", pageSize=" + pageSize + ", start=" + start + "]";
	}

}
